#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>

#define FOR(i,a,n) for(int i=a;i<n;++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;

const int inf = 1<<29;

struct Edge
{
    int vs,vt,w;
    Edge* next;
    void set(int a,int b,int c,Edge* nt = NULL)
    {
        vs=a,vt=b,w=c,next=nt;
    }
};
class Graph
{
#define EACH(i,vs) for(Edge* i=head[vs];i;i=i->next)
  public:
  int vn,arcn;
  Edge *edge,**head;
  Graph(int n,int m)
  {
    vn=n+1,arcn=0;
    edge = new Edge[m+10];
    head = new Edge*[n+10];
    fill(head,head+n+10,(Edge*)NULL);
  }
  ~Graph()
  {
    delete(edge);
    delete(head);
  }
  void AddArc(int vs,int vt,int w)
  {
    edge[arcn].set(vs,vt,w,head[vs]);
    head[vs]=&edge[arcn++];
  }
  void AddEdge(int vs,int vt,int w)
  {
    AddArc(vs,vt,w);
    AddArc(vt,vs,w);
  }
  bool NegLoop(int vs)
  {
    vector<int> cnt(vn,0);
    vector<int> dist(vn,inf);
    vector<bool> inQueue(vn,false);
    queue<int> q;
    q.push(vs);
    dist[vs]=0,cnt[vs]=1,inQueue[vs]=true;
    while(!q.empty())
    {
        vs = q.front();q.pop();
        inQueue[vs]=false;
        EACH(ep,vs) if(dist[vs]+ep->w<dist[ep->vt])
        {
            dist[ep->vt]=dist[vs]+ep->w;
            if(++cnt[ep->vt]==vn) return true;
            if(!inQueue[ep->vt])
            {
                q.push(ep->vt);
                inQueue[ep->vt]=true;
            }
        }
    }
    return false;
  }
};
int main()
{
    int n,m;
    int ss = 0;
    while(cin>>n>>m)
    {
        Graph g(n,m*2+n);
        REP(i,m)
        {
            char s[2];
            scanf("%s",s);
            if(s[0]=='P')
            {
                int a,b,x;
                scanf("%d%d%d",&a,&b,&x);
                g.AddArc(b,a,x);
                g.AddArc(a,b,-x);
            }
            else
            {
                int a,b;
                scanf("%d%d",&a,&b);
                g.AddArc(a,b,-1);
            }
        }
        REP(i,n) g.AddArc(ss,i+1,0);
        if(g.NegLoop(ss)) puts("Unreliable");
        else puts("Reliable");
    }
	return 0;
}
